/**
 * 单例基类
 */
export default abstract class Singleton {
    public static getInstance<T extends Singleton>(this: new () => T): T {
        if (!this['_instance']) {
            this['_instance'] = new this();
        }
        return this['_instance'] as T;
    }
}